package com.anjubao.parking.municipal.parkinglot.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 停车场计费规则
 *
 * @author zhuchunfeng
 */
@Getter
@Setter
@ApiModel("停车场计费规则")
public class BillRuleDto {

//    @TableField(value="id")
//    @ApiModelProperty(name="id",value = "主键id")
//    private Long id;
//
    @TableField(value="code")
    @ApiModelProperty(name="code",value = "计费编码",required = true)
    private String code;

    @TableField(value="name")
    @ApiModelProperty(name="name",value = "计费规则名称",required = true)
    @NotNull
    private String name;

    @TableField(value="parking_free_time")
    @ApiModelProperty(name="parkingFreeTime",value = "停车免费时长，单位为秒",required = true)
    @NotNull
    private Integer parkingFreeTime;

    @TableField(value="day_fee_max")
    @ApiModelProperty(name="dayFeeMax",value = "24小时收费封顶值，单位为分",required = true)
    @NotNull
    private Integer dayFeeMax;

    @TableField(value="leave_free_time")
    @ApiModelProperty(name="leaveFreeTime",value = "离场免费时长，单位为秒",required = true)
    @NotNull
    private Integer leaveFreeTime;

    @TableField(value="note")
    @ApiModelProperty(name="note",value = "备注")
    private String note;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime createTime;

}